<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>ssl::context</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../index.html" title="Asio">
<link rel="up" href="../reference.html" title="Reference">
<link rel="prev" href="ssl__basic_context/_basic_context.html" title="ssl::basic_context::~basic_context">
<link rel="next" href="ssl__context_base.html" title="ssl::context_base">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ssl__basic_context/_basic_context.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="ssl__context_base.html"><img src="../../next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="asio.reference.ssl__context"></a><a class="link" href="ssl__context.html" title="ssl::context">ssl::context</a>
</h3></div></div></div>
<p>
        <a class="indexterm" name="id1152351"></a> 
Typedef for the typical usage of context.
      </p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">basic_context</span><span class="special">&lt;</span> <span class="identifier">context_service</span> <span class="special">&gt;</span> <span class="identifier">context</span><span class="special">;</span>
</pre>
<a name="asio.reference.ssl__context.types"></a><h5>
<a name="id1152409"></a>
        <a class="link" href="ssl__context.html#asio.reference.ssl__context.types">Types</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/file_format.html" title="ssl::basic_context::file_format"><span class="bold"><strong>file_format</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  File format types.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/impl_type.html" title="ssl::basic_context::impl_type"><span class="bold"><strong>impl_type</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The native implementation type of the locking dispatcher.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/method.html" title="ssl::basic_context::method"><span class="bold"><strong>method</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Different methods supported by a context.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/options.html" title="ssl::basic_context::options"><span class="bold"><strong>options</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Bitmask type for SSL options.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/password_purpose.html" title="ssl::basic_context::password_purpose"><span class="bold"><strong>password_purpose</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Purpose of PEM password.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/service_type.html" title="ssl::basic_context::service_type"><span class="bold"><strong>service_type</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The type of the service that will be used to provide context operations.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/verify_mode.html" title="ssl::basic_context::verify_mode"><span class="bold"><strong>verify_mode</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Bitmask type for peer verification.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<a name="asio.reference.ssl__context.member_functions"></a><h5>
<a name="id1152652"></a>
        <a class="link" href="ssl__context.html#asio.reference.ssl__context.member_functions">Member Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/add_verify_path.html" title="ssl::basic_context::add_verify_path"><span class="bold"><strong>add_verify_path</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Add a directory containing certificate authority files to be used
                  for performing verification.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/basic_context.html" title="ssl::basic_context::basic_context"><span class="bold"><strong>basic_context</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Constructor.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/impl.html" title="ssl::basic_context::impl"><span class="bold"><strong>impl</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Get the underlying implementation in the native type.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/load_verify_file.html" title="ssl::basic_context::load_verify_file"><span class="bold"><strong>load_verify_file</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Load a certification authority file for performing verification.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/set_options.html" title="ssl::basic_context::set_options"><span class="bold"><strong>set_options</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Set options on the context.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/set_password_callback.html" title="ssl::basic_context::set_password_callback"><span class="bold"><strong>set_password_callback</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Set the password callback.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/set_verify_mode.html" title="ssl::basic_context::set_verify_mode"><span class="bold"><strong>set_verify_mode</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Set the peer verification mode.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/use_certificate_chain_file.html" title="ssl::basic_context::use_certificate_chain_file"><span class="bold"><strong>use_certificate_chain_file</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Use a certificate chain from a file.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/use_certificate_file.html" title="ssl::basic_context::use_certificate_file"><span class="bold"><strong>use_certificate_file</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Use a certificate from a file.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/use_private_key_file.html" title="ssl::basic_context::use_private_key_file"><span class="bold"><strong>use_private_key_file</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Use a private key from a file.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/use_rsa_private_key_file.html" title="ssl::basic_context::use_rsa_private_key_file"><span class="bold"><strong>use_rsa_private_key_file</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Use an RSA private key from a file.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/use_tmp_dh_file.html" title="ssl::basic_context::use_tmp_dh_file"><span class="bold"><strong>use_tmp_dh_file</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Use the specified file to obtain the temporary Diffie-Hellman parameters.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/_basic_context.html" title="ssl::basic_context::~basic_context"><span class="bold"><strong>~basic_context</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Destructor.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<a name="asio.reference.ssl__context.data_members"></a><h5>
<a name="id1153062"></a>
        <a class="link" href="ssl__context.html#asio.reference.ssl__context.data_members">Data Members</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/default_workarounds.html" title="ssl::basic_context::default_workarounds"><span class="bold"><strong>default_workarounds</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Implement various bug workarounds.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/no_sslv2.html" title="ssl::basic_context::no_sslv2"><span class="bold"><strong>no_sslv2</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Disable SSL v2.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/no_sslv3.html" title="ssl::basic_context::no_sslv3"><span class="bold"><strong>no_sslv3</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Disable SSL v3.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/no_tlsv1.html" title="ssl::basic_context::no_tlsv1"><span class="bold"><strong>no_tlsv1</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Disable TLS v1.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/single_dh_use.html" title="ssl::basic_context::single_dh_use"><span class="bold"><strong>single_dh_use</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Always create a new key when using tmp_dh parameters.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/verify_client_once.html" title="ssl::basic_context::verify_client_once"><span class="bold"><strong>verify_client_once</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Do not request client certificate on renegotiation. Ignored unless
                  verify_peer is set.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/verify_fail_if_no_peer_cert.html" title="ssl::basic_context::verify_fail_if_no_peer_cert"><span class="bold"><strong>verify_fail_if_no_peer_cert</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Fail verification if the peer has no certificate. Ignored unless
                  verify_peer is set.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/verify_none.html" title="ssl::basic_context::verify_none"><span class="bold"><strong>verify_none</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  No verification.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="ssl__basic_context/verify_peer.html" title="ssl::basic_context::verify_peer"><span class="bold"><strong>verify_peer</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Verify the peer.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<a name="asio.reference.ssl__context.requirements"></a><h5>
<a name="id1153363"></a>
        <a class="link" href="ssl__context.html#asio.reference.ssl__context.requirements">Requirements</a>
      </h5>
<p>
        <span class="bold"><strong>Header: </strong></span><code class="literal">asio/ssl/context.hpp</code>
      </p>
<p>
        <span class="bold"><strong>Convenience header: </strong></span><code class="literal">asio/ssl.hpp</code>
      </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2003 - 2010 Christopher M. Kohlhoff<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ssl__basic_context/_basic_context.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="ssl__context_base.html"><img src="../../next.png" alt="Next"></a>
</div>
</body>
</html>
